/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package util.synch;

/**
 *
 * @author martin
 */
public class Atom<T> {
  private T _val;
  
  public Atom(final T initialVal){
    _val=initialVal;
  }
  
  public synchronized void set(final T val){
    _val=val;
  }
  
  public synchronized T get(){
    return _val;
  }
}
